home *** CD-ROM | disk | FTP | other *** search
- PROGRAM PROG9;
- {$U+ Copyright (C), 1985 by Lyle Faurot. All rights reserved.
-
- New Topics: FOR statement
- ":n" to specify field width in Write
- }
-
- VAR
- Low, High, Index : Integer;
-
- BEGIN
- Write('Enter a number (may be negative): ');
- ReadLn(Low);
- Write('Enter a larger number: ');
- ReadLn(High);
- WriteLn;
-
- WriteLn('Ascending');
- FOR Index := Low to High DO
- WriteLn(Index:10);
-
- WriteLn('Descending');
- FOR Index := High DownTo Low DO
- WriteLn(Index:6);
- END.